<?php
/**
 *wap首页
 */
namespace wap\controllers;
use Yii;
use services\models\IndexQuery;

class IndexController extends CustomController{
    
    public  $layout_data = 'index';
    public function actionIndex(){

//        echo '这是wap'."<br>";
//        echo '优选id：'.$this->bestry_uid."<br>";
//        echo '喜试id：'.$this->liketry_uid."<br>";
//        echo 'openid：'.$this->openid."<br>";
        
        $indexQuery = new IndexQuery();
        
        $banner_list = $indexQuery->getWapBannerListByRedis(); //BANNER
        $day_try_list = $indexQuery->getDayTry();           //每日一试
        $try_rec_list = $indexQuery->getTryRec();           //小试推荐
        $super_try_list = $indexQuery->getSuperTry();       //超值试用

        return $this->render('index', [
            'banner_list' => $banner_list,
            'day_try_list' => $day_try_list,
            'try_rec_list' => $try_rec_list,
            'super_try_list' => $super_try_list
        ]);
    }
}